<?php foreach ($list as $val){

$val['url'] =  $this->weburl.str_replace('{tid}',$val['id'],str_replace('{aid}',$val['aid'],$val['url']));

$caozuo = '<a href="javascript:" onclick="tb_show(\'执行任务\',\''.$val['url'].'/?height=100&width=320\')" class="thickbox">执行</a> | <a href="javascript:" onclick="tb_show(\'修改时间\',\'/timing/update/'.$val['id'].'/?height=100&width=320\')">修改</a> | <a href="javascript:" onclick="timing_del('.$val['id'].')" class="time_delete" ">删除</a>';

if ($val['position'] == 0)
{
	$val['position'] = '<font color=#009900>未执行</font>';
	
}
elseif ($val['position'] == 1)
{
	$val['position'] = '<font color=#990000>已执行</font>';
	$caozuo = '';
}
else
{
	$val['position'] = '<font color=red>执行失败</font>';
	
}
?>
<script>
function timing_del(ids)
{
	var text = $(this).parent().parent();
		$.post('/timing/delete/',{id:ids},function(data){
			if (data == '1')
			{
				$(".del_"+ids).hide(300);
			}
		})
}
</script>
<div class="user_list del_<?php echo $val['id'];?>" >
	<div class="face"><img src="<?php echo $val['face'];?>" class="img"/><br><?php echo $val['name'];?></div>
	<div style="text-align:left;">
		发送时间：<br><?php echo date("m-d G:i:s",$val['dtime']);?><br>
		发送状态：<?php echo $val['position'];?><br>
		<?php echo $caozuo;?>
	</div>
</div>

<?php }?>